




<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <h:head>


    </h:head>
    <h:body>


        <h:form id="filterDataFrm">
            <p:growl id="list_growl" showDetail="true" />
            <h:panelGrid style="width:100%">
                <p:messages id="List_msg" />
                <p:panel style="width:80%" header="Search">


                    <h:column>
                        <h:outputLabel rendered="false" value="ID" />
                        <h:inputText  id="Attr_filter_By_ID"
                                      value="#{attributesPropertiesBean.attributesPropertiesSrchCrit.ID}"
                                      rendered="false"  />

                    </h:column>

                    <h:column>
                        <h:outputLabel rendered="false" value="MainPrjID" />
                        <h:selectOneMenu  id="Attr_filter_By_mainPrjID"
                                          value="#{attributesPropertiesBean.attributesPropertiesTable.mainPrjID}"
                                          required="false"
                                          rendered="true"
                                          requiredMessage="MainPrjID is Mandatory">
                            <f:selectItems value="#{attributesPropertiesBean.mainProjectList}"/>
                        </h:selectOneMenu>

                    </h:column>

                    <h:column>
                        <h:outputLabel rendered="false" value="Code" />
                        <h:inputText  id="Attr_filter_By_code"
                                      value="#{attributesPropertiesBean.attributesPropertiesSrchCrit.code}"
                                      rendered="false"  />

                    </h:column>

                    <h:column>
                        <h:outputLabel rendered="false" value="Type" />
                        <h:inputText  id="Attr_filter_By_type"
                                      value="#{attributesPropertiesBean.attributesPropertiesSrchCrit.type}"
                                      rendered="false"  />

                    </h:column>

                    <h:column>
                        <h:outputLabel rendered="false" value="Descr" />
                        <h:inputText  id="Attr_filter_By_descr"
                                      value="#{attributesPropertiesBean.attributesPropertiesSrchCrit.descr}"
                                      rendered="false"  />

                    </h:column>




                    <p:commandButton id="submitFilter" value="Filter"
                                     process="@this, Attr_filter_By_ID ,  Attr_filter_By_mainPrjID ,  Attr_filter_By_code ,  Attr_filter_By_type ,  Attr_filter_By_descr "   action="#{attributesPropertiesBean.doFilter}" update="list_growl" oncomplete="lazyload()"  />
                    <p:commandButton id="clearFilter" value="Clear"
                                     process="@this"   action="#{attributesPropertiesBean.clearFilter}" update="list_growl" oncomplete="lazyload()"  />

                </p:panel>

            </h:panelGrid>


            <h:panelGrid style="width:100%" id="dtPanelGrd" columns="2" cellpadding="10">


                <p:confirmDialog modal="true" draggable="false" position="center" severity="warning"
                                 widgetVar="varConfirmDelete" id="confirmDelete" message="Are you sure to delete?"  >
                    <p:commandButton process="@this" action="#{attributesPropertiesBean.delete}" value="Yes" oncomplete="varConfirmDelete.hide();lazyload();"  update="dt1,list_growl,List_msg"  />
                    <p:commandButton value="No" onclick="varConfirmDelete.hide()" />

                </p:confirmDialog>
                <p:remoteCommand name="lazyload" update="dt_list_frm"/>

                <p:dialog id="attributesPropertiesDialog"  header="Update AttributesProperties Detail" widgetVar="varAttributesPropertiesDialog"
                          modal="true" draggable="false" showEffect="fade" width="500" closeOnEscape="false">

                    <b>Update AttributesProperties</b>
                    <table>

                        <tr>
                            <td>    <h:outputLabel rendered="true" value="ID" /></td>
                        <td>:</td>
                        <td>
                        <h:inputText  id="Attr_update_ID"
                                      value="#{attributesPropertiesBean.attributesPropertiesUpdate.ID}"
                                      required="false"
                                      rendered="true"
                                      requiredMessage="ID is Mandatory"/>
                        </td>
                        </tr>

                        <tr>
                            <td>    <h:outputLabel rendered="true" value="MainPrjID" /></td>
                        <td>:</td>
                        <td>
                        <h:selectOneMenu  id="Attr_update_mainPrjID"
                                          value="#{attributesPropertiesBean.attributesPropertiesTable.mainPrjID}"
                                          required="false"
                                          rendered="true"
                                          requiredMessage="MainPrjID is Mandatory">
                            <f:selectItems value="#{attributesPropertiesBean.mainProjectList}"/>
                        </h:selectOneMenu>
                        </td>
                        </tr>

                        <tr>
                            <td>    <h:outputLabel rendered="true" value="Code" /></td>
                        <td>:</td>
                        <td>
                        <h:inputText  id="Attr_update_code"
                                      value="#{attributesPropertiesBean.attributesPropertiesUpdate.code}"
                                      required="false"
                                      rendered="true"
                                      requiredMessage="Code is Mandatory"/>
                        </td>
                        </tr>

                        <tr>
                            <td>    <h:outputLabel rendered="true" value="Type" /></td>
                        <td>:</td>
                        <td>
                        <h:inputText  id="Attr_update_type"
                                      value="#{attributesPropertiesBean.attributesPropertiesUpdate.type}"
                                      required="false"
                                      rendered="true"
                                      requiredMessage="Type is Mandatory"/>
                        </td>
                        </tr>

                        <tr>
                            <td>    <h:outputLabel rendered="true" value="Descr" /></td>
                        <td>:</td>
                        <td>
                        <h:inputText  id="Attr_update_descr"
                                      value="#{attributesPropertiesBean.attributesPropertiesUpdate.descr}"
                                      required="false"
                                      rendered="true"
                                      requiredMessage="Descr is Mandatory"/>
                        </td>
                        </tr>






                    </table>
                    <h:panelGrid id="displayUpdatePanelGrid" >
                        <p:commandButton process="@this, Attr_update_ID ,  Attr_update_mainPrjID ,  Attr_update_code ,  Attr_update_type ,  Attr_update_descr "
                                         value="update" title="Update AttributesProperties"   action="#{attributesPropertiesBean.update}" oncomplete="varAttributesPropertiesDialog.hide();lazyload();"  />
                    </h:panelGrid>
                </p:dialog>
            </h:panelGrid>



        </h:form>


        <h:form id="dt_list_frm">

            <p:dataTable id="dt1" var="dt_AttributesProperties" value="#{attributesPropertiesBean.attributesPropertiesList}"
                         paginator="true" rows="10" emptyMessage="no data" selectionMode="single" style="width: 80%" >

                <f:facet name="header">
                    List of AttributesProperties
                </f:facet>
                <f:facet name="footer">
                    <span>All Data</span>
                    <h:commandLink  >
                        <p:graphicImage style="border: 0px" value="/resources/icons/XLS.png" />
                        <p:dataExporter type="xls" target="dt1" fileName="All_attributesProperties" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>

                    <h:commandLink>
                        <p:graphicImage style="border: 0px" value="/resources/icons/PDF.png" />
                        <p:dataExporter type="pdf" target="dt1" fileName="All_attributesProperties" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>

                    <h:commandLink>
                        <p:graphicImage style="border: 0px" value="/resources/icons/CSV.png" />
                        <p:dataExporter type="csv" target="dt1" fileName="All_attributesProperties" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>

                    <h:commandLink>
                        <p:graphicImage style="border: 0px" value="/resources/icons/XML.png" />
                        <p:dataExporter type="xml" target="dt1" fileName="All_attributesProperties" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>


                    <span>This Page</span>
                    <h:commandLink>
                        <p:graphicImage style="border: 0px" value="/resources/icons/XLS.png" />
                        <p:dataExporter type="xls" target="dt1" fileName="page_attributesProperties"
                                        pageOnly="true" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>

                    <h:commandLink >
                        <p:graphicImage style="border: 0px" value="/resources/icons/PDF.png" />
                        <p:dataExporter type="pdf" target="dt1" fileName="page_attributesProperties"
                                        pageOnly="true" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>

                    <h:commandLink>
                        <p:graphicImage style="border: 0px" value="/resources/icons/CSV.png" />
                        <p:dataExporter type="csv" target="dt1" fileName="page_attributesProperties"
                                        pageOnly="true" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>

                    <h:commandLink>
                        <p:graphicImage style="border: 0px" value="/resources/icons/XML.png" />
                        <p:dataExporter type="xml" target="dt1" fileName="page_attributesProperties"
                                        pageOnly="true" excludeColumns="#{attributesPropertiesBean.excludedClmn}" />
                    </h:commandLink>

                </f:facet>



                <p:column>
                    <f:facet name="header">
                        <h:outputText value="ID" />
                    </f:facet>
                    <h:outputText value="#{dt_AttributesProperties.ID}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="MainPrjName" />
                    </f:facet>
                    <h:outputText value="#{dt_AttributesProperties.mainPrjName}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Code" />
                    </f:facet>
                    <h:outputText value="#{dt_AttributesProperties.code}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Type" />
                    </f:facet>
                    <h:outputText value="#{dt_AttributesProperties.type}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Descr" />
                    </f:facet>
                    <h:outputText value="#{dt_AttributesProperties.descr}" />
                </p:column>
                <p:column>
                    <f:facet name="header">
                        <h:outputText value="test" />
                    </f:facet>
                    <h:inputText id="testDescr"  value="#{dt_AttributesProperties.descr}" />
                </p:column>

                <p:column>
       
                     <p:commandButton process="@this"  value="Edit" title="Update"  action="#{attributesPropertiesBean.updateRow}" update="list_growl,List_msg"  >
                         <f:param name="ID" value="#{dt_AttributesProperties.ID}" />
                        <f:param name="newDescr" value="#{dt_AttributesProperties.descr}" />
                    </p:commandButton>
                </p:column>

             

                <p:column>
                    <f:facet name="header">
                        <h:outputText value="Options" />
                    </f:facet>
                    <p:commandButton process="@this" image="ui-icon ui-icon-trash" title="Delete AttributesProperties"  oncomplete="varConfirmDelete.show()" action="#{attributesPropertiesBean.setIDinSession}"  >
                        <f:param name="attributesPropertiesID" value="#{dt_AttributesProperties.ID}" />
                    </p:commandButton>
                    <p:commandButton process="@this"  value="Edit" title="Update AttributesProperties"  action="#{attributesPropertiesBean.setIDinSession}" update="list_growl,List_msg,filterDataFrm" oncomplete="varAttributesPropertiesDialog.show()"  >
                        <f:param name="attributesPropertiesID" value="#{dt_AttributesProperties.ID}"  />
                    </p:commandButton>

                </p:column>

            </p:dataTable>

        </h:form>

    </h:body>
</html>

